public void StoreSession(AxolotlAddress address, SessionRecord record) { DeleteSession(address); SessionsRepository sessionsRepository = new SessionsRepository(); Sessions session = new Sessions() { RecipientId = address.GetName(), DeviceId = address.GetDeviceId(), Record = record.Serialize() }; sessionsRepository.Save(session); }
/// <summary> /// /// </summary> /// <param name="address"></param> /// <param name="record"></param> public void StoreSession(AxolotlAddress address, SessionRecord record) { String recipientId = address.GetName(); uint deviceId = address.GetDeviceId(); if (SessionsObjectDic.ContainsKey(recipientId)) { SessionsObjectDic.Remove(recipientId); } SessionsObjectDic.Add(recipientId, new SessionsObject() { DeviceId = deviceId, RecipientId = recipientId, Record = record.Serialize() }); }
public void StoreSession(AxolotlAddress address, SessionRecord record) { sessions[address] = record.Serialize(); }
public void StoreSession(SignalProtocolAddress address, SessionRecord record) { _sessions[address] = record.Serialize(); }